'''
socket 客户端
    1. 建立socket对象
    2. connect连接
    3. recv/send 接收 发送数据
    4. close
'''
import socket
socket_client = socket.socket()
ip = '127.0.0.1'
port = 80
socket_client.connect((ip,port))
print("连接服务端成功")
instr = input("请输入要发送的内容")
print(type(instr))
socket_client.send(instr.encode('utf-8'))
socket_client.close()
print('结束')